home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_bas
/
t2win_32.zip
/
_IEEENUM.FRM
< prev
next >
Wrap
Text File
|
1996-05-14
|
10KB
|
416 lines
VERSION 4.00
Begin VB.Form frmIeeenum
BorderStyle = 4 'Fixed ToolWindow
Caption = "Ieeenum"
ClientHeight = 4845
ClientLeft = 1890
ClientTop = 3270
ClientWidth = 7485
Height = 5250
Left = 1830
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 4845
ScaleWidth = 7485
ShowInTaskbar = 0 'False
Top = 2925
Width = 7605
Begin Threed.SSPanel SSPanel1
Align = 1 'Align Top
Height = 480
Left = 0
TabIndex = 1
Top = 0
Width = 7485
_Version = 65536
_ExtentX = 13203
_ExtentY = 847
_StockProps = 15
ForeColor = -2147483640
BackColor = 12632256
Begin VB.ComboBox cmb_Function
Height = 315
Left = 1365
TabIndex = 2
Top = 90
Width = 4785
End
Begin Threed.SSCommand cmdNP
Height = 300
Index = 1
Left = 7140
TabIndex = 6
Top = 90
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 529
_StockProps = 78
Caption = ">"
BevelWidth = 1
Font3D = 3
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin Threed.SSCommand cmdNP
Height = 300
Index = 0
Left = 6300
TabIndex = 5
Top = 90
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 529
_StockProps = 78
Caption = "<"
BevelWidth = 1
Font3D = 3
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin VB.Label Label2
Caption = "&Select a function"
Height = 255
Left = 90
TabIndex = 4
Top = 120
Width = 1275
End
Begin Threed.SSCommand SSCommand1
Default = -1 'True
Height = 300
Left = 6615
TabIndex = 3
Top = 90
Width = 465
_Version = 65536
_ExtentX = 820
_ExtentY = 529
_StockProps = 78
Caption = "&Go"
BevelWidth = 1
RoundedCorners = 0 'False
Outline = 0 'False
End
End
Begin VB.Label lbl_Result
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
ForeColor = &H80000008&
Height = 4110
Left = 90
TabIndex = 0
Top = 630
Width = 7305
End
End
Attribute VB_Name = "frmIeeenum"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Const Iteration = 250
Dim IsLoaded As Integer
Dim TimerStartOk As Integer
Dim TimerCloseOk As Integer
Dim TimerHandle As Integer
Dim TimerValue As Long
Private Sub cmdNP_Click(Index As Integer)
Call sub_NextPrev(cmb_Function, Index)
End Sub
Private Sub cmb_Function_Click()
If (IsLoaded = False) Then Exit Sub
Call cDisableFI(mdiT2W.Picture1)
lbl_Result = ""
DoEvents
Select Case cmb_Function.ListIndex
Case 0
Call TestByte
Case 1
Call TestInteger
Case 2
Call TestLong
Case 3
Call TestSingle
Case 4
Call TestDouble
Case 5
Call TestCurrency
End Select
DoEvents
Call cEnableFI(mdiT2W.Picture1)
End Sub
Private Sub Form_Activate()
mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
End Sub
Private Sub Form_Load()
IsLoaded = False
Show
Call sub_Load_Combo(cmb_Function, T2WDirInst + "_ieeenum.t2w")
IsLoaded = True
End Sub
Private Sub SSCommand1_Click()
Call cmb_Function_Click
End Sub
Private Sub TestByte()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Byte
strResult = ""
strDisplay = ""
For i = 1 To 7
j = Int((255 - 1 + 1) * Rnd + 1)
strResult = cMKB(j)
strDisplay = strDisplay + "MKB of '" & j & "' is '0x" & cToHexa(strResult) & "'" & vbCrLf
strDisplay = strDisplay + "CVB of '0x" & cToHexa(strResult) & "' is '" & cCVB(strResult) & "'" & vbCrLf & vbCrLf
Next i
lbl_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cMKB(j)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestInteger()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
strResult = ""
strDisplay = ""
Call cRndInit(-1)
For i = 1 To 7
j = cRndI()
strResult = cMKI(j)
strDisplay = strDisplay + "MKI of '" & j & "' is '0x" & cToHexa(strResult) & "'" & vbCrLf
strDisplay = strDisplay + "CVI of '0x" & cToHexa(strResult) & "' is '" & cCVI(strResult) & "'" & vbCrLf & vbCrLf
Next i
lbl_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cMKI(j)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestLong()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Long
strResult = ""
strDisplay = ""
Call cRndInit(-1)
For i = 1 To 7
j = cRndL()
strResult = cMKL(j)
strDisplay = strDisplay + "MKL of '" & j & "' is '0x" & cToHexa(strResult) & "'" & vbCrLf
strDisplay = strDisplay + "CVL of '0x" & cToHexa(strResult) & "' is '" & cCVL(strResult) & "'" & vbCrLf & vbCrLf
Next i
lbl_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cMKL(j)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestSingle()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Single
strResult = ""
strDisplay = ""
Call cRndInit(-1)
For i = 1 To 7
j = cRndS()
strResult = cMKS(j)
strDisplay = strDisplay + "MKS of '" & j & "' is '0x" & cToHexa(strResult) & "'" & vbCrLf
strDisplay = strDisplay + "CVS of '0x" & cToHexa(strResult) & "' is '" & cCVS(strResult) & "'" & vbCrLf & vbCrLf
Next i
lbl_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cMKS(j)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestDouble()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Double
strResult = ""
strDisplay = ""
Call cRndInit(-1)
For i = 1 To 7
j = cRndD()
strResult = cMKD(j)
strDisplay = strDisplay + "MKD of '" & j & "' is '0x" & cToHexa(strResult) & "'" & vbCrLf
strDisplay = strDisplay + "CVD of '0x" & cToHexa(strResult) & "' is '" & cCVD(strResult) & "'" & vbCrLf & vbCrLf
Next i
lbl_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cMKD(j)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestCurrency()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Currency
strResult = ""
strDisplay = ""
Call cRndInit(-1)
For i = 1 To 7
j = cRndS()
strResult = cMKC(j)
strDisplay = strDisplay + "MKC of '" & j & "' is '0x" & cToHexa(strResult) & "'" & vbCrLf
strDisplay = strDisplay + "CVC of '0x" & cToHexa(strResult) & "' is '" & cCVC(strResult) & "'" & vbCrLf & vbCrLf
Next i
lbl_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cMKC(j)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub